

use "data_for_stock_return.dta", clear


*** Table 2

********************************************
********<< A >>flag_high + f_re7_jpy*************
********************************************

***************************************
*************(1)No interactions*******
***************************************
*** without controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) & DataDate<mdy(1,1,2020),detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high log_per log_vola ///
								    etf_cum5 ///
				    if DataDate>=mdy(12,1,2010)   & etf_cum5>0  ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)





***************************************
*************(2)single interactions*******
***************************************
*** without controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high log_per log_vola ///
								    etf_cum5 etf_cum5_flag_high ///
				    if DataDate>=mdy(12,1,2010)  & etf_cum5>0  ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)


*** (3)
*** with controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high log_per log_vola ///
								    etf_cum5 etf_cum5_flag_high ///
								    c.etf_cum5#c.frate_stock c.etf_cum5#c.log_turnover ///
									c.etf_cum5#c.log_marketcap c.etf_cum5#c.log_per ///
									c.etf_cum5#c.DIVY  c.etf_cum5#c.log_vola ///
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0  ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)


****(4) with beta
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high log_per log_vola ///
								    etf_cum5 etf_cum5_flag_high ///
								    c.etf_cum5#c.frate_stock c.etf_cum5#c.log_turnover ///
									c.etf_cum5#c.log_marketcap c.etf_cum5#c.log_per ///
									c.etf_cum5#c.DIVY c.etf_cum5#c.log_vola  ///
					CrMktETF CrSMBETF CrHMLETF CrWMLETF ///
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0  ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)


*** (5) 

***************************************
*************triple interactions*******
***************************************

*** without controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high log_per log_vola ///
                                    etf_cum5 etf_cum5_flag_high ///
									etf_cum5_cum_purchase etf_cum5_cum_flag_high ///				
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0 & etf_cum5<.   ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)


*** (6)
*** with controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high log_per log_vola  ///
                                    etf_cum5 etf_cum5_flag_high ///
									etf_cum5_cum_purchase etf_cum5_cum_flag_high ///
									c.etf_cum5#c.frate_stock c.etf_cum5#c.log_turnover ///
									c.etf_cum5#c.log_marketcap c.etf_cum5#c.log_per ///
									c.etf_cum5#c.DIVY c.etf_cum5#c.log_vola ///
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0 & etf_cum5<.   ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)



*** (7) beta
*** with controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high log_per log_vola ///
                                    etf_cum5 etf_cum5_flag_high ///
									etf_cum5_cum_purchase etf_cum5_cum_flag_high ///
									c.etf_cum5#c.frate_stock c.etf_cum5#c.log_turnover ///
									c.etf_cum5#c.log_marketcap c.etf_cum5#c.log_per ///
									c.etf_cum5#c.DIVY c.etf_cum5#c.log_vola ///
									CrMktETF CrSMBETF CrHMLETF CrWMLETF ///
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0 & etf_cum5<.   ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)










******************************
********** Table A1 **********
******************************



eststo clear

********************************************
****<< D >>Robustness CrossTerm on Betas:flag_high75****
********************************************
***************************************
*************(1)No interactions*******
***************************************
*** without controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high75 log_per log_vola ///
								    etf_cum5 ///
					  ///
				    if DataDate>=mdy(12,1,2010)  & etf_cum5>0  ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)

***************************************
*************(2)single interactions*******
***************************************
*** without controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high75 log_per log_vola ///
								    etf_cum5 etf_cum5_flag_high75 ///
					  ///
				    if DataDate>=mdy(12,1,2010)  & etf_cum5>0  ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)


*** (3) 
*** with controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high75 log_per log_vola ///
								    etf_cum5 etf_cum5_flag_high75 ///
								    c.etf_cum5#c.frate_stock c.etf_cum5#c.log_turnover ///
									c.etf_cum5#c.log_marketcap c.etf_cum5#c.log_per ///
									c.etf_cum5#c.DIVY c.etf_cum5#c.log_vola ///
					  ///
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0  ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)


**** with (4) beta 
*** with controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high75 log_per  log_vola ///
								    etf_cum5 etf_cum5_flag_high75 ///
								    c.etf_cum5#c.frate_stock c.etf_cum5#c.log_turnover ///
									c.etf_cum5#c.log_marketcap c.etf_cum5#c.log_per ///
									c.etf_cum5#c.DIVY  c.etf_cum5#c.log_vola ///
					CrMktETF CrSMBETF CrHMLETF CrWMLETF ///
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0  ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)


*** (5) triple
*** without controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high75 log_per log_vola ///
                                    etf_cum5 etf_cum5_flag_high75 ///
									etf_cum5_cum_purchase etf_cum5_cum_flag_high75 ///				
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0 & etf_cum5<.   ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)


*** (6)
*** with controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high75 log_per log_vola ///
                                    etf_cum5 etf_cum5_flag_high75 ///
									etf_cum5_cum_purchase etf_cum5_cum_flag_high75 ///
									c.etf_cum5#c.frate_stock c.etf_cum5#c.log_turnover ///
									c.etf_cum5#c.log_marketcap c.etf_cum5#c.log_per ///
									c.etf_cum5#c.DIVY  c.etf_cum5#c.log_vola ///
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0 & etf_cum5<.   ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)










*** (7)
*** with controls ***
sum f_re7_jpy if DataDate>=mdy(12,1,2010) ,detail
eststo: reghdfe f_re7_jpy  re7_jpy frate_stock log_turnover log_marketcap DIVY flag_high75 log_per  log_vola  ///
                                    etf_cum5 etf_cum5_flag_high75 ///
									etf_cum5_cum_purchase etf_cum5_cum_flag_high75 ///
									c.etf_cum5#c.frate_stock c.etf_cum5#c.log_turnover ///
									c.etf_cum5#c.log_marketcap c.etf_cum5#c.log_per ///
									c.etf_cum5#c.DIVY  c.etf_cum5#c.log_vola ///
									CrMktETF CrSMBETF CrHMLETF CrWMLETF ///
					if DataDate>=mdy(12,1,2010)  & etf_cum5>0 & etf_cum5<.   ///
					& f_re7_jpy <`r(p99)' & f_re7_jpy>`r(p1)' , ///
a(QUICK DataDate) vce(cluster QUICK DataDate)
